package com.hotel.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.hotel.dao.mapper.UserMapper;
import com.hotel.entity.User;


@Service
public class AdminService {

	@Autowired
	private UserMapper userMapper;
	
	
	
	/**
	 * 根据 id 获取 User
	 * @param userId
	 * @return
	 */
	public User getUserById(int userId) {
		return this.userMapper.selectByPrimaryKey(userId);  
	} 
	
}
